﻿<FrameworkElement 
    x:Class="Magellan.Transitionals.Transitions.ZoomOutFrameworkElement"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    >
    <FrameworkElement.Resources>
        <Style x:Key="OldStyle" TargetType="ContentPresenter">
            <Setter Property="RenderTransformOrigin" Value="0.5, 0.5"/>
            <Setter Property="RenderTransform">
                <Setter.Value>
                    <ScaleTransform ScaleX="1" ScaleY="1"/>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="NewStyle" TargetType="ContentPresenter">
            <Setter Property="RenderTransformOrigin" Value="0.5, 0.5"/>
            <Setter Property="RenderTransform">
                <Setter.Value>
                    <ScaleTransform ScaleX="1" ScaleY="1"/>
                </Setter.Value>
            </Setter>
        </Style>
        <Storyboard x:Key="OldStoryboard">
            <DoubleAnimation Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:0.5"/>
            <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" From="1" To="0.5" Duration="0:0:0.5" AccelerationRatio="0.5" DecelerationRatio="0.5"/>
            <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0.5" Duration="0:0:0.5" AccelerationRatio="0.5" DecelerationRatio="0.5"/>
        </Storyboard>
        <Storyboard x:Key="NewStoryboard">
            <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.5" />
            <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" From="1.2" To="1" Duration="0:0:0.5" AccelerationRatio="0.5" DecelerationRatio="0.5"/>
            <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" From="1.2" To="1" Duration="0:0:0.5" AccelerationRatio="0.5" DecelerationRatio="0.5"/>
        </Storyboard>
    </FrameworkElement.Resources>
</FrameworkElement>

